@extends('admin.layout')
@section('title',$title)
@section('content')
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                链接管理
                <small>请在这里管理链接</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i>链接添加</a></li>
                <li class="active">链接管理</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <!-- left column -->
                <div class="col-md-12">
                    <!-- general form elements -->
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title">链接添加</h3>
                        </div><!-- /.box-header -->
                        <!-- form start -->
         

                    @if (count($errors) > 0)
                        <div class="alert alert-danger alert-dismissable">
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                            <h4><i class="icon fa fa-ban"></i> 注意!</h4>
                            <ul>
                                @foreach ($errors->all() as $error)
                                    <li>{{ $error }}</li>
                                @endforeach
                            </ul>
                        </div>
                    @endif
                        <form role="form" action="/admin/link/insert" method="post" enctype="multipart/form-data">
                        {{ csrf_field() }}
                            <div class="box-body">
                                <div class="form-group">
                                    <label for="exampleInputFile">头部图片</label>
                                    <input type="file" name='img_head' value="{{ old('img_head') }}" id="exampleInputFile">
                                    <p class="help-block">请在这里添加头部图片</p>
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputEmail1">链接名</label>
                                    <input type="text" name="name"  class="form-control" id="exampleInputEmail1"
                                           placeholder="请输入链接名">
                                </div>
                                <div class="form-group">
                                    <label for="exampleInputPassword1">链接地址</label>
                                    <input type="text" name="url" class="form-control" id="exampleInputPassword1"
                                           placeholder="请输入URL">
                            
                            </div><!-- /.box-body -->

                            <div class="box-footer">
                                <button type="submit" class="btn btn-primary">添加</button>
                                <button type="reset" class="btn btn-danger">重置</button>
                            </div>
                        </form>
                    </div><!-- /.box -->

                    


                </div><!--/.col (left) -->
                <!-- right column --> 
            </div>   <!-- /.row -->
        </section><!-- /.content -->
    </div><!-- /.content-wrapper -->
@endsection